﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CommandLine;
using CommandLine.Text;

namespace JSBuild
{
    public class Options
    {
        [Option("e", "extension", Required = false, HelpText = "Only include files with this extension.")]
        public String Extension = ".js";

        [Option("l", "logfile", Required = false, HelpText = "Write output to this file instead of STDOUT.")]
        public String LogFile = null;

        [Option("m", "minified-output", Required = false, HelpText = "Where to write the minified output.")]
        public String MinifiedOutput = null;

        [Option("o", "output", Required = true, HelpText = "Where to write the output.")]
        public String Output = null;

        [Option("s", "source", Required = true, HelpText = "Directory to process.")]
        public String Source = null;

        [Option("t", "type", Required = true, HelpText = "Input Type ('js' or 'css').")]
        public String Type = null;

        [Option("v", "verbose", Required = false, HelpText = "Display details.")]
        public bool Verbose = false;

        [HelpOption(HelpText = "Display this help screen.")]
        public string GetUsage()
        {
            HelpText help = new HelpText("ConCatJS " + Program.Version.ToString());
            help.AddPreOptionsLine("http://concatjs.codeplex.com");
            help.AddOptions(this);
            return help.ToString();
        }
    }
}
